package com.ywgt.mapper;

import com.github.pagehelper.Page;
import com.ywgt.pojo.Coupon;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 优惠券信息及规则表 Mapper 接口
 * </p>
 *
 * @author yiping
 * @since 2021-03-13
 */
public interface CouponMapper extends BaseMapper<Coupon> {

    Page<Coupon> selectCoupons(@Param("name") String name, @Param("type") Integer type, @Param("status") Integer status,
                               @Param("sort") String sort, @Param("order") String order);

    Page<Coupon> selectAvailableCoupons(@Param("ids") List<Integer> ids,@Param("offset") int offset, @Param("limit") int limit);
}
